<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var arr2 = [7, 10, 6, 12, 3, 20];

			function sort(arr) {
				var t;
				for (var x = 0; x < arr.length - 1; x++) {
					for (var j = x + 1; j < arr.length; j++) {
						if (arr[x] > arr[j]) {
							t = arr[x];
							arr[x] = arr[j];
							arr[j] = t;
						}
					}
				}
			}

			function list(arr) {
				for (var i = 0; i < arr.length; i++) {
					console.log(arr[i]);
				}
			}
			
			sort(arr2);
			list(arr2);
		</script>
	</head>
	<body>
	</body>
</html>
